package com.mornd.gulimall.apis.product.fallback;

import com.mornd.gulimall.apis.product.IProductClient;
import com.mornd.gulimall.apis.product.to.SkuInfoTo;
import com.mornd.gulimall.apis.product.to.SpuInfoTo;
import com.mornd.gulimall.common.core.base.BaseFallback;
import com.mornd.gulimall.common.core.result.R;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: mornd
 * @dateTime: 2023/8/31 - 10:36
 *
 * sentinel 使用fallback模式，需要开启配置：feign.sentinel.enabled: true
 */

@Component
public class ProductClientFallback extends BaseFallback implements IProductClient {
    @Override
    public R<SkuInfoTo> getSkuInfoById(Long skuId) {
        return error();
    }

    @Override
    public R<List<String>> getSkuSaleStringlist(Long skuId) {
        return error();
    }

    @Override
    public R<SpuInfoTo> getSpuInfo(Long spuId) {
        return error();
    }
}
